package com.augmentum.sellproductservice.productclient;

import com.augmentum.sellproductserive.common.transfer.ProductInfoInput;
import com.augmentum.sellproductserive.common.transfer.ProductInfoOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "product")
public interface ProductClient {

    @GetMapping("/feign/msg")
    String hello(@RequestBody String name);

    @GetMapping("/product/msg")
    String hello2(String name);

    @GetMapping("/product/products")
    List<ProductInfoOutput> findProductsByIds(@RequestParam("productIds") List<String> productIds);

    @PutMapping("/product/products")
    String decreaseStock(@RequestBody List<ProductInfoInput> productDtos);
}
